# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.CloudChannel.V1.Model.GoogleCloudChannelV1ImportCustomerRequest do
  @moduledoc """
  Request message for CloudChannelService.ImportCustomer

  ## Attributes

  *   `authToken` (*type:* `String.t`, *default:* `nil`) - Optional. The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details.
  *   `channelPartnerId` (*type:* `String.t`, *default:* `nil`) - Optional. Cloud Identity ID of a channel partner who will be the direct reseller for the customer's order. This field is required for 2-tier transfer scenarios and can be provided via the request Parent binding as well.
  *   `cloudIdentityId` (*type:* `String.t`, *default:* `nil`) - Required. Customer's Cloud Identity ID
  *   `customer` (*type:* `String.t`, *default:* `nil`) - Optional. Specifies the customer that will receive imported Cloud Identity information. Format: accounts/{account_id}/customers/{customer_id}
  *   `domain` (*type:* `String.t`, *default:* `nil`) - Required. Customer domain.
  *   `overwriteIfExists` (*type:* `boolean()`, *default:* `nil`) - Required. Choose to overwrite an existing customer if found. This must be set to true if there is an existing customer with a conflicting region code or domain.
  *   `primaryAdminEmail` (*type:* `String.t`, *default:* `nil`) - Required. Customer's primary admin email.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :authToken => String.t() | nil,
          :channelPartnerId => String.t() | nil,
          :cloudIdentityId => String.t() | nil,
          :customer => String.t() | nil,
          :domain => String.t() | nil,
          :overwriteIfExists => boolean() | nil,
          :primaryAdminEmail => String.t() | nil
        }

  field(:authToken)
  field(:channelPartnerId)
  field(:cloudIdentityId)
  field(:customer)
  field(:domain)
  field(:overwriteIfExists)
  field(:primaryAdminEmail)
end

defimpl Poison.Decoder,
  for: GoogleApi.CloudChannel.V1.Model.GoogleCloudChannelV1ImportCustomerRequest do
  def decode(value, options) do
    GoogleApi.CloudChannel.V1.Model.GoogleCloudChannelV1ImportCustomerRequest.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.CloudChannel.V1.Model.GoogleCloudChannelV1ImportCustomerRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
